package com.cdie.myschool.mapper.StudentTermReportMapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdie.myschool.domain.entity.BookHistoryOld;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;

/**
 * @program:my-school
 * @ClassName:BookHistoryOldMapper
 * @Description:借阅记录Old
 * @author:毛康源
 * @data:2022-10-10 11:00
 **/
@Mapper
public interface BookHistoryOldMapper extends BaseMapper<BookHistoryOld> {
    @Select("select * from book_lending_history")
    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 1000)
    @ResultType(BookHistoryOld.class)
    @DS("slave_1")
    void getBookHistoryData(ResultHandler<BookHistoryOld> handler3);
}
